<template>
  <div class="begin-container">
    <div class="content">
      <div class="login" @click="showLoginPop = true"></div>
      <div class="index" @click="goIndex"></div>
    </div>
    <LoginPop :show.sync="showLoginPop" @onClose="close" />
  </div>
</template>

<script>
import LoginPop from "@/components/LoginPop.vue";
export default {
  name: "Begin",
  components: {
    LoginPop,
  },
  data() {
    return {
      showLoginPop: false,
    };
  },
  methods: {
    goIndex() {
      this.$router.push({
        path: "/index",
      });
    },
    close() {
      setTimeout(() => {
        this.goIndex();
      }, 2000);
    },
  },
};
</script>

<style lang="less" scoped>
.begin-container {
  width: 100%;
  height: 100vh;
  background-color: #f5f7f9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  .content {
    width: 100%;
    height: 100vh;
    background-image: url("../../assets/imgs/begin-bg.jpg");
    box-shadow: 2px 0 12px 1px #0000000f;
    position: relative;
    background-size: cover;
    background-repeat: no-repeat;
    .login {
      position: absolute;
      top: 4%;
      right: 2%;
      width: 15%;
      height: 50px;
      cursor: pointer;
      // background: rgba(0, 0, 0, 0.2);
    }
    .index {
      position: absolute;
      bottom: 3%;
      left: 10%;
      width: 25%;
      height: 20%;
      border-radius: 30px;
      cursor: pointer;
      // background: rgba(0, 0, 0, 0.2);
    }
  }
}
</style>
